package wiki.kaizen.cloud.plugin.spring.serializer;

import com.alibaba.fastjson.serializer.SerializeWriter;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

public class LocalTimeSerializer extends AbstractLocalTemporalSerializer {
    @Override
    public void write(SerializeWriter writer, Object object) {
        writer.writeString(
                ((LocalTime)object).format(DateTimeFormatter.ofPattern("HH:mm:ss"))
        );
    }
}
